<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 添加 -->
    <form action="##">
        姓名: <input type="text" id="addUserName" placeholder="请输入姓名"><br>
        性别: <input type="text" id="addGender" placeholder="请输入性别"><br>
        <input type="submit" value="添加">
    </form><br><br>

    <table border="1">
        <thead>
            <tr bgcolor="gray" align="center">
                <td>编号</td>
                <td>姓名</td>
                <td>性别</td>
                <td>操作</td>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>1</td>
                <td>文渊</td>
                <td>男</td>
                <td>
                    <button>编辑</button>
                    <button>删除</button>
                </td>
            </tr>
        </tbody>
    </table>
    <br><br>
    <!-- 修改 -->
    <form action="##">
        <input type="hidden">
        姓名: <input type="text" id="editUserName" placeholder="请输入姓名"><br>
        性别: <input type="text" id="editGender" placeholder="请输入性别"><br>
        <input type="submit" value="修改">
    </form>
    <script>
        /* 1. 准备数据 对象数组*/
        var userList = [
            {id:1,username:"张三",gender:"男"},
            {id:2,username:"李四",gender:"男"},
            {id:3,username:"王五",gender:"女"},
            {id:4,username:"赵六",gender:"男"},
            {id:5,username:"田七",gender:"女"},
        ]
        /* 
            查询:   
                将用户列表当中的数据渲染出来
            增:
                注意: ID 是唯一的    
            删:
                都是根据ID来进行删除
            改:
                先根据ID获取这个用户的信息,然后将用户的信息给渲染出来
                点击修改按钮,在修改数据
        */
    </script>
</body>
</html>